<?php
namespace App\Models\Traits;

trait Btn
{
    public function editBtn(string $route)//{{route('admin.user.edit',$item)}}
    {

        /*if(auth()->user()->username?:''!=config('rbac.super') && !in_array($route,request()->auths)){
            return  "";
        }*/
        return '<a href="'.route($route,$this).'" class="label label-secondary radiius">修改</a>';
    }
    public function deleteBtn(string $route)//{{route('admin.user.edit',$item)}}
    {

       /* if(auth()->user()->username?:''!=config('rbac.super') && !in_array($route,request()->auths)){
            return  "";
        }*/
        return '<a href="'.route($route,$this).'" class="label label-warning radiius">删除</a>';
    }
}
